<template>
  <div class="addcheckwork">
    <h3 class="title">个人考勤中心</h3>
    <!-- 列表数据 -->
    <el-table :data="list" style="width: 80%" stripe>
      <el-table-column label="创建日期" prop="createTime"></el-table-column>
      <el-table-column label="用户姓名" prop="createByName"></el-table-column>
      <el-table-column label="工作内容" prop="content"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import userRequest from "../request/user";
export default {
  data() {
    return {
      id: null,
      list: [],
    };
  },

  methods: {
    // 获取个人考勤列表
    getmyCheckwork() {
      userRequest.myCheckwork({ pageNo: 0, pageSize: 0 }).then((res) => {
        if (res.data.code == 200) {
          this.list = res.data.result.result;
          console.log(this.list, "个人考勤");
        }
      });
    },
  },

  created() {
    //获取本地用户信息
    this.id = JSON.parse(window.localStorage.getItem("userinfo")).id;
    this.getmyCheckwork();
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-table--fit {
  margin-top: 50px;
}
</style>